From: H. Peter Anvin Date: Tue, 9 Sep 2014 16:09:08 +0000 (+0200) Subject: x86, idle: add barriers to CLFLUSH workaround X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4432 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=48d32458bcd453e31b458bca868a079a6d0a38af;p=xen.git x86, idle: add barriers to CLFLUSH workaround ... since the documentation is explicit that CLFLUSH is only ordered with respect to MFENCE. Signed-off-by: H. Peter Anvin Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index b05fb39182..136c0b6373 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -336,7 +336,11 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx) s_time_t expires = per_cpu(timer_deadline, cpu); if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) ) + { + mb(); clflush((void *)&mwait_wakeup(cpu)); + mb(); + } __monitor((void *)&mwait_wakeup(cpu), 0, 0); smp_mb();